{{include_file name='public/header' title='安装程序'}}
<link href="{{STATIC_URL}}/css/install.css" rel="stylesheet">

</head>

<body>

    <div class="container">
        <div class="row">
            <div class="col-md-10 col-md-offset-1">
                <div class="install-panel panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title text-center">安装步骤四</h3>
                    </div>
                    <div class="panel-body">

                        {{include_file name='public/nav' step=4}}

                        <div class="row">
                            <div class="col-lg-12">
                                <div class="panel panel-default">
                                    <div class="panel-body">
                                        <div style="margin-bottom: 20px;">
                                            {{foreach $tables as $table}}
                                            <p>创建数据表  <code>{{$table}}</code>  ……  成功</p>
                                            {{/foreach}}

                                        </div>

                                        <div class="progress">
                                            <div id="processbar" class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                                                20%
                                            </div>
                                        </div>

                                        <div class="alert alert-warning fade in hidden js_alert">
                                            <strong>恭喜您，程序已经安装成功，为了安全考虑，强烈建议您立即删除application/install安装目录。</strong>
                                        </div>

                                        <div class="panel-button text-center">

                                            <a href="" class="btn btn-success js_admin disabled">程序安装中</a>

                                        </div>

                                    </div>

                                </div>
                            </div>

                        </div>
                    </div>

                </div>
            </div>
        </div>

    </div>
    <script>

        function setProcess(){
            var processbar = document.getElementById("processbar");
            processbar.style.width = parseInt(processbar.style.width) + 10 + "%";
            processbar.innerHTML = processbar.style.width;
            if(processbar.style.width == "100%"){

                $('.js_delete').removeClass('disabled');
                $('.js_alert').removeClass('hidden');

                $('.js_admin').attr('href', "{{url('admin')}}").text('管理接口文档').removeClass('disabled');

                window.clearInterval(bartimer);
            }
        }

        var bartimer = window.setInterval(function(){setProcess();},100);
        window.onload = function(){
            bartimer;
        }

    </script>

    {{include_file name='public/footer'}}
